<template>
  <div>
    <h1>医生排版</h1>
    <el-tabs v-model="activeName">
      <el-tab-pane label="排班列表" name="list">
        <el-table :data="tableData" height="500" style="width: 100%">
          <el-table-column prop="date" label="排班日期" />
          <el-table-column label="星期">
            <template slot-scope="sc">
              <b v-if="sc.row.week == 0">星期日</b>
              <b v-if="sc.row.week == 1">星期一</b>
              <b v-if="sc.row.week == 2">星期二</b>
              <b v-if="sc.row.week == 3">星期三</b>
              <b v-if="sc.row.week == 4">星期四</b>
              <b v-if="sc.row.week == 5">星期五</b>
              <b v-if="sc.row.week == 6">星期六</b>
            </template>
          </el-table-column>
          <el-table-column label="时段">
            <template slot-scope="sc">
              <b v-if="sc.row.subsectionType == 1">上午-8:00~12:00</b>
              <b v-if="sc.row.subsectionType == 2">下午-13:00~17:00</b>
              <b v-if="sc.row.subsectionType == 3">晚上-18:00~8:00</b>
            </template>
          </el-table-column>

          <el-table-column prop="hospitalName" label="医院名称" />
          <el-table-column prop="departmentName" label="科室" />
          <el-table-column prop="trueName" label="医生" />
          <el-table-column prop="registeredfeeId" label="挂号费用id" />
        </el-table>
      </el-tab-pane>
      <el-tab-pane label="添加排班" name="second">
        <el-row>
          <el-col :span="3">时段</el-col>
          <el-col :span="3">星期一</el-col>
          <el-col :span="3">星期二</el-col>
          <el-col :span="3">星期三</el-col>
          <el-col :span="3">星期四</el-col>
          <el-col :span="3">星期五</el-col>
          <el-col :span="3">星期六</el-col>
          <el-col :span="3">星期日</el-col>
        </el-row>

        <el-row>
          <el-col :span="3">上午</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
        </el-row>
        <el-row>
          <el-col :span="3">下午</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
        </el-row>
        <el-row>
          <el-col :span="3">晚上</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
          <el-col :span="3">1</el-col>
        </el-row>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import { getAllScheduling } from '../../api/doctor/doctorscheduling'
export default {
  name: 'Doctorscheduling',
  data() {
    return {
      paibanlist: [
        {
          shiduan: '上午'
        },
        {
          shiduan: '下午'
        },
        {
          shiduan: '晚上'
        }
      ],
      activeName: 'list',
      tableData: []
    }
  },
  mounted() {
    getAllScheduling().then((re) => {
      this.tableData = re.data.data
    })
  }
}
</script>

<style>
</style>
